//package com.gzsj.genealogyManagement.people.controller;
//
//import com.gzsj.genealogyManagement.people.config.PdfGenerationService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.HttpStatus;
//import org.springframework.http.MediaType;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.HashMap;
//import java.util.Map;
//
//@RestController
//public class PdfController {
//
//    @Autowired
//    private PdfGenerationService pdfService;
//
//    @GetMapping(value = "/generate-pdf", produces = MediaType.APPLICATION_PDF_VALUE)
//    public ResponseEntity<byte[]> generatePdfEndpoint() throws Exception {
//        Map<String, Object> data = new HashMap<>();
//        // 添加数据到 data
//        String htmlContent = pdfService.generateHtml(data);
//        byte[] pdfBytes = pdfService.generatePdf(htmlContent);
//        return new ResponseEntity<>(pdfBytes, HttpStatus.OK);
//    }
//}